/*
 * Copyright (C) 2011 Wglxy.com
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.wglxy.example.dash1;

import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TabHost;
import android.widget.TabHost.TabSpec;


public class Dash_Associative extends TabActivity 
{

	

protected void onCreate(Bundle savedInstanceState) 
{
    super.onCreate(savedInstanceState);
    setContentView (R.layout.activity_f2);
    //setTitleFromActivityLabel (R.id.title_text);
    
TabHost tabHost = getTabHost();
    
    // Tab for IT
    TabSpec itspec = tabHost.newTabSpec("IT");
    itspec.setIndicator("IT", getResources().getDrawable(R.drawable.icon_photos_tab));
    Intent itIntent = new Intent(this, A_IT.class);
    itspec.setContent(itIntent);
    
    // Tab for Social
    TabSpec socialspec = tabHost.newTabSpec("Social");
    // setting Title and Icon for the Tab
    socialspec.setIndicator("Social", getResources().getDrawable(R.drawable.icon_songs_tab));
    Intent socialIntent = new Intent(this, A_Social.class);
    socialspec.setContent(socialIntent);
    
    // Tab for Litterature
    TabSpec litteraturespec = tabHost.newTabSpec("Litterature");
    litteraturespec.setIndicator("Litterature", getResources().getDrawable(R.drawable.icon_videos_tab));
    Intent littIntent = new Intent(this, A_Litterature.class);
    litteraturespec.setContent(littIntent);
    
    // Tab for Sportif
    TabSpec sportspec = tabHost.newTabSpec("Sportif");
    sportspec.setIndicator("Sportif", getResources().getDrawable(R.drawable.icon_photos_tab));
    Intent sportifIntent = new Intent(this, A_Sportif.class);
    sportspec.setContent(sportifIntent);
    
    // Adding all TabSpec to TabHost
    tabHost.addTab(itspec); // Adding photos tab
    tabHost.addTab(socialspec); // Adding songs tab
    tabHost.addTab(litteraturespec); // Adding videos tab
    tabHost.addTab(sportspec); // Adding videos tab
}

    
} // end class
